﻿using RpcClient.Interface;
using RpcSync.Service.Interface;

namespace RpcSync.Service.Broadcast
{
    internal class BroadcastExtendService : IExtendService
    {
        public string Name => "BroadcastExtendService";
        private IDeadQueueService _DeadQueue;

        public BroadcastExtendService(IDeadQueueService deadQueue)
        {
            this._DeadQueue = deadQueue;
        }

        public void Load(IRpcService service)
        {
            service.StartUpComplate += this.Service_StartUpComplate;
        }

        private void Service_StartUpComplate()
        {
            _DeadQueue.Init();
        }
    }
}
